﻿
var loginInfo = new Vue({
    el: "#loginInfo",
    data: {
        loginName: '',
        password:''
    },
    methods: {
        login: function () {
            if (!loginInfo.loginName) {
                gkb_alert("请输入用户名","warning")
                return;
            }
            if (!loginInfo.password) {
                gkb_alert("请输入密码","warning")
            }
            var param = {
                loginName: loginInfo.loginName,
                pwd: loginInfo.password
            }
            jQuery.ax({
                url: "/Login/LoginIn",
                data: param,
                success: function (result) {
                    //当返回值code不是A0000 说明存在异常，直接进行提示即可
                    if (result.code != "A0000") {
                        gkb_alert(result.data, "error");
                        return;
                    }
                    window.location.href = "/Home/Index";
                }
            })
        }
    }
})
